package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.BehaviorTypeService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.BffAddBehaviorTypeRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryBehaviorTypeDetailRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryBehaviorTypeListRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffUpdateBehaviorTypeRespDto;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseBehaviorTypeClient;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeListRespDto;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeListReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrframework.integration.dto.AddBehaviorTypeRespDto;
import com.wicket.okrframework.integration.dto.AddBehaviorTypeReqDto;
import com.wicket.okrframework.integration.dto.UpdateBehaviorTypeRespDto;
import com.wicket.okrframework.integration.dto.UpdateBehaviorTypeReqDto;
import com.wicket.okrframework.integration.FwBaseAppSceneClient;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryEnablingBehaviorTypeListBorderRespDto;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrframework.integration.dto.QueryCurrentBizAppSceneRelEdListRespDto;
import com.wicket.okrframework.integration.dto.QueryCurrentBizAppSceneRelEdListReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryBehaviorTypeBorderRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryBehaviorTypeBorderReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffEnablingBehaviorTypeDto;
import cn.hutool.core.bean.BeanUtil;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "BehaviorType", tags = {"BehaviorType"})
@RestController
// @RequestMapping("/poms/behaviorType/")
public class BehaviorTypeController {
    @Autowired
    BehaviorTypeService behaviorTypeService;

    /**
   * B1-1查询行为类型列表（平台）
   * gen by moon at 10/23/2022, 9:18:45 PM
   */
    @PostMapping("/oms/platform/behaviorType/queryBehaviorTypeList")
    @ApiOperation(value = "B1-1查询行为类型列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryBehaviorTypeListRespDto> queryBehaviorTypeList(@RequestBody(required=false) @Validated BffQueryBehaviorTypeListReqDto reqDTO){
        return OkrResult.success(behaviorTypeService.queryBehaviorTypeList(reqDTO));
    }

    /**
   * B1-1修改行为类型（平台）
   * gen by moon at 9/1/2022, 7:22:36 PM
   */
    @PostMapping("/oms/platform/behaviorType/updateBehaviorType")
    @ApiOperation(value = "B1-1修改行为类型（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateBehaviorTypeRespDto> updateBehaviorType(@RequestBody(required=false) @Validated BffUpdateBehaviorTypeReqDto reqDTO){
        return OkrResult.success(behaviorTypeService.updateBehaviorType(reqDTO));
    }

    /**
   * B1-1新增行为类型（平台）
   * gen by moon at 9/1/2022, 7:22:35 PM
   */
    @PostMapping("/oms/platform/behaviorType/addBehaviorType")
    @ApiOperation(value = "B1-1新增行为类型（平台）", response = OkrResult.class)
    public OkrResult<BffAddBehaviorTypeRespDto> addBehaviorType(@RequestBody(required=false) @Validated BffAddBehaviorTypeReqDto reqDTO){
        return OkrResult.success(behaviorTypeService.addBehaviorType(reqDTO));
    }

    /**
   * B1-1查询行为类型详情（平台）
   * gen by moon at 10/28/2022, 8:54:27 PM
   */
    @PostMapping("/oms/platform/behaviorType/queryBehaviorTypeDetail")
    @ApiOperation(value = "B1-1查询行为类型详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryBehaviorTypeDetailRespDto> queryBehaviorTypeDetail(@RequestBody(required=false) @Validated BffQueryBehaviorTypeDetailReqDto reqDTO){
        return OkrResult.success(behaviorTypeService.queryBehaviorTypeDetail(reqDTO));
    }
/**
   * B1查询赋能的行为类型列表(管理)(边界)
   * gen by moon at 10/25/2022, 10:01:16 AM
   */
    @PostMapping("/oms/platform/mgt/behaviorType/queryEnablingBehaviorTypeListBorder")
    @ApiOperation(value = "B1查询赋能的行为类型列表(管理)(边界)", response = OkrResult.class)
    public OkrResult<BffQueryEnablingBehaviorTypeListBorderRespDto> queryEnablingBehaviorTypeListBorder(@RequestBody(required=false) @Validated BffQueryEnablingBehaviorTypeListBorderReqDto reqDTO){
        return OkrResult.success(behaviorTypeService.queryEnablingBehaviorTypeListBorder(reqDTO));
    }

}

